<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Project Group 05</title>
<meta name="keywords" content="CEG Hypermarket System" />
<meta name="description" content="The objective of “CEG Hypermarket System” is to produce software and hardware design which handles daily operation of the hypermarkets." />

	<link href="templatemo_style.css" type="text/css" rel="stylesheet" /> 
	<script type="text/javascript" src="js/jquery.min.js"></script> 
	<script type="text/javascript" src="js/jquery.scrollTo-min.js"></script> 
	<script type="text/javascript" src="js/jquery.localscroll-min.js"></script> 
	<script type="text/javascript" src="js/init.js"></script> 
    
    <link rel="stylesheet" href="css/slimbox2.css" type="text/css" media="screen" /> 
    <script type="text/JavaScript" src="js/slimbox2.js"></script> 

</head> 
<body> 
<div id="templatemo_header">
    <div id="site_title"><h1><a href="http://www.ceg.nus.edu.sg/students/documents/ceg-welcome-tea-2013.revisedasat18July2013.pdf" 
	title="CEG Hypermarket System">CEG Hypermarket System</a></h1></div>
	<div align="right">
	<?PHP
		include('admin-panel/config/config.php');
		if(isset($_POST['username']))
			{
				$conn = mysql_connect($cfg["connection"]["host"], $cfg["connection"]["userName"], $cfg["connection"]["password"]) 
					or die ('Error Cannot Connect to MySQL');
				@mysql_select_db($cfg["connection"]["database"]) or die( "Unable to select database");
				
				$keyin_userName = db_escape_string($_POST['username']);
				$keyin_password = db_escape_string($_POST['pw']);
				$query = "SELECT count(*) FROM adm WHERE name = '".$keyin_userName."' AND password= MD5('".$keyin_password."');";
				$result = mysql_query($query);
				$row = mysql_fetch_array($result) or die(mysql_error());
			
				if($row[0] == 1){
					header ("Location: admin-panel/index.php");
				}
				else
				{
					//to be DEVELOPED
					header ("Location: index.php");
					echo "Login Failed";
				}
				$conn.close();
			}
		function db_escape_string($text) {
			if (function_exists('mb_detect_encoding')) {
				$cur_encoding = mb_detect_encoding($text);
				if(($cur_encoding != "UTF-8" && $cur_encoding != "ASCII") || !mb_check_encoding($text, "UTF-8")) 
					$text = utf8_encode($text);
			}
			return mysql_real_escape_string($text);
		}
	?>
	<form method="post" action="<?PHP $_PHP_SELF_?>">
		Username <input type="text" id="username" name="username" placeholder="username" value="Tai"/>
		Password <input type="password" id="pw" name="pw" placeholder="password" value="group05"/>
		<p><input type="submit" value="Login"/></p>
	</form>		
	</div>
</div>
<div id="templatemo_main">
    <div id="content"> 
		<div id="home" class="section">
        	
			<div id="home_about" class="box">
           	  <h2>Welcome</h2>
                <p>The objective of “CEG Hypermarket System” is to produce software and hardware design which handles daily operation of the hypermarkets. The system is capable of performing check out operation, keeping track of stock level and price of various items inside the hypermarket as well as monitoring and adjusting the pricing of the item at the global scope</p>
                <p>There are 3 main software components that we are developing: Cashier System (for Cashier to check out goods), Shop System (for Shop Administrators to manage daily sales activity) and HQ System (for Headquarter Administrators to monitor the stock and price in all the shops)</p>
            </div>
            
            <div id="home_gallery" class="box no_mr">
                <a href="images/gallery/01-l.jpg" rel="lightbox[gallery]"><img src="images/gallery/01.jpg" alt="image 1" /></a>
                <a href="images/gallery/02-l.jpg" rel="lightbox[gallery]"><img src="images/gallery/02.jpg" alt="image 2" /></a>
                <a href="images/gallery/03-l.jpg" rel="lightbox[gallery]" class="no_mr"><img src="images/gallery/03.jpg" alt="image 3" /></a>
                <a href="images/gallery/04-l.jpg" rel="lightbox[gallery]"><img src="images/gallery/04.jpg" alt="image 4" /></a>
                <a href="images/gallery/05-l.jpg" rel="lightbox[gallery]"><img src="images/gallery/05.jpg" alt="image 5" /></a>
                <a href="images/gallery/06-l.jpg" rel="lightbox[gallery]" class="no_mr"><img src="images/gallery/06.jpg" alt="image 6" /></a>
            </div>
            
            <div class="box home_box1 color1">
            	<a href="#Locations"><img src="images/locations.jpg" alt="Locationsl" /></a>
            </div>
            
            <div class="box home_box1 color2">
	            <a href="#testimonial"><img src="images/testimonial.jpg" alt="Testimonial" /></a>
            </div>
            
            <div class="box home_box2 color3">
            	<div id="social_links">
                    <a href="https://www.facebook.com/CG3002-05-z"><img src="images/facebook.png" alt="Facebook" /></a>
                    <a href="#"><img src="images/flickr.png" alt="Flickr" /></a>
                    <a href="https://www.facebook.com/CG3002-05-z"><img src="images/twitter.png" alt="Twitter" /></a>
                    <a href="#"><img src="images/youtube.png" alt="Youtube" /></a>
                    <a href="https://www.facebook.com/CG3002-05-z"><img src="images/vimeo.png" alt="Vimeo" /></a>
              <div class="clear h20"></div>
                    <h3>Social</h3>
              </div>	
            </div>
            
            <div class="box home_box1 color4 no_mr">
            	<a href="#contact"><img src="images/contact.jpg" alt="Contact" /></a>
            </div>
               
        </div> <!-- END of home -->
        
        <div class="section section_with_padding" id="Locations"> 
            <h2>Locations</h2>
			 <div id="locations_leftPanel" class="locations"> 
			 </div>
             <div id="locations_gallery" class="locations">
				<a href="images/locations/North America.jpg" rel="lightbox[gallery]"><img src="images/locations/North America.jpg" alt="image 1" /></a>
                <a href="images/locations/North America.jpg" rel="lightbox[gallery]"><img src="images/locations/North America.jpg" alt="image 1" /></a>
				<a href="images/locations/North America.jpg" rel="lightbox[gallery]"><img src="images/locations/North America.jpg" alt="image 1" /></a>
				<a href="images/locations/North America.jpg" rel="lightbox[gallery]"><img src="images/locations/North America.jpg" alt="image 1" /></a>
				<a href="images/locations/North America.jpg" rel="lightbox[gallery]"><img src="images/locations/North America.jpg" alt="image 1" /></a>
				<a href="images/locations/North America.jpg" rel="lightbox[gallery]"><img src="images/locations/North America.jpg" alt="image 1" /></a>
            </div>

            <a href="#home" class="slider_nav_btn home_btn">home</a> 
            <a href="#home" class="slider_nav_btn previous_btn">Previous</a>
            <a href="#testimonial" class="slider_nav_btn next_btn">Next</a> 

        </div> 
        <div class="section section_with_padding" id="testimonial"> 
            <h2>Testimonial</h2>
            <p><em>Kindly let us know your queries and feedback. </em></p>
            <div class="clear h40"></div>
            <div class="half left">
            	<div class="img_border img_fl">
                	<img src="images/templatemo_image_01.jpg" alt="image 1" />
                </div>
                <p>Fusce nec felis id lacus sollicitudin vulputate. Proin tincidunt, arcu id pellentesque accumsan, neque dolor imperdiet ligula. </p>
                <cite>Walker - <span>TemplateMo.com</span></cite>
			</div>
            <div class="half right">
                <div class="img_border img_fl">
                	<img src="images/templatemo_image_01.jpg" alt="image 2" />
                </div>
                <p>Fusce nec felis id lacus sollicitudin vulputate. Proin tincidunt, arcu id pellentesque accumsan, neque dolor imperdiet ligula. </p>
                <cite>Jason - <span>TemplateMo.com</span></cite>
			</div>
            <div class="clear h40"></div>
            <div class="half left">
            	<div class="img_border img_fl">
                	<img src="images/templatemo_image_01.jpg" alt="image 3" />
                </div>
                <p>Fusce nec felis id lacus sollicitudin vulputate. Proin tincidunt, arcu id pellentesque accumsan, neque dolor imperdiet ligula. </p>
                <cite>Danny - <span>FlashMo.com</span></cite>
			</div>
            <div class="half right">
                <div class="img_border img_fl">
                	<img src="images/templatemo_image_01.jpg" alt="image 4" />
                </div>
                <p>Fusce nec felis id lacus sollicitudin vulputate. Proin tincidunt, arcu id pellentesque accumsan, neque dolor imperdiet ligula. </p>
                <cite>Katey - <span>KoFlash.com</span></cite> 
			</div>
                    
            <a href="#home" class="slider_nav_btn home_btn">home</a> 
            <a href="#Locations" class="slider_nav_btn previous_btn">Previous</a>
            <a href="#contact" class="slider_nav_btn next_btn">Next</a> 
        </div> 
        <div class="section section_with_padding" id="contact"> 
            <h2>Contact</h2> 
            <div class="half left">
                <h4>Quick Contact Form</h4>
                <p>Please provide your contact details</p>
                <div id="contact_form">
                    <form method="post" name="contact" action="#contact">
                        <div class="left">
                            <label for="author">Name:</label> <input name="author" type="text" class="input_field" id="author" maxlength="40" />
                        </div>
                        <div class="right">                           
                            <label for="email">Email:</label> <input name="email" type="text" class="input_field" id="email" maxlength="40" />
                        </div>
                        <div class="clear"></div>
                        <label for="text">Message:</label> <textarea id="text" name="text" rows="0" cols="0"></textarea>
                        <input type="submit" class="submit_btn float_l" name="submit" id="submit" value="Send" />
                    </form>
                </div>
            </div>
            
            <div class="half right">
                <h4>Mailing Address</h4>
                12 Kent Ridge Drive<br />
                National University of Singapore<br />
                Singapore 119243<br />
          		<strong>Email: ngoctai@nus.edu.sg</strong><br />
                
                <div class="clear h20"></div>
                <div class="img_nom img_border"><span></span>
                
                <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=12+Kent+Ridge+Drive+Singapore&amp;aq=0&amp;oq=12+Kent&amp;sll=1.325451,103.814278&amp;sspn=0.186374,0.338173&amp;ie=UTF8&amp;hq=&amp;hnear=12+Kent+Ridge+Dr,+Singapore+119243&amp;t=p&amp;ll=1.292586,103.771019&amp;spn=0.030033,0.036478&amp;z=14&amp;iwloc=A&amp;output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=12+Kent+Ridge+Drive+Singapore&amp;aq=0&amp;oq=12+Kent&amp;sll=1.325451,103.814278&amp;sspn=0.186374,0.338173&amp;ie=UTF8&amp;hq=&amp;hnear=12+Kent+Ridge+Dr,+Singapore+119243&amp;t=p&amp;ll=1.292586,103.771019&amp;spn=0.030033,0.036478&amp;z=14&amp;iwloc=A" style="color:#0000FF;text-align:left">View Larger Map</a></small>
                
            </div>
			<a href="#home" class="slider_nav_btn home_btn">home</a> 
            <a href="#testimonial" class="slider_nav_btn previous_btn">Previous</a>
             
        </div> 
    </div> 
</div>
</div>
<div id="templatemo_footer">
    <a class="templatemo_footer_icon" href="http://tr.forwallpaper.com" title="duvar kağıdı masaüstü" rel="nofollow" target="_blank"><img src="images/templatemo_footer_icon.png" alt="duvar kağıdı masaüstü" title="duvar kağıdı masaüstü" /></a>Copyright © 2013 <a href="#">CG3002 Group05</a> | <a href="http://www.ceg.nus.edu.sg/students/documents/ceg-welcome-tea-2013.revisedasat18July2013.pdf">CEG Hypermarket System</a>
</div>

 
<script type='text/javascript' src='js/logging.js'></script>
</body>
</html>